<template>
	<view class="wrap">
		<chat-list :messages="message"></chat-list>
	</view>
	<ChatInput @send="onSend"></ChatInput>
</template>

<script setup>
	import ChatInput from './chat-input.vue'
	import ChatList from './chat-list.vue'
	import { useChat } from '@/hook/use-chat.js'
	
	const { send, message } = useChat()
	
	
	function onSend(content) {
		send(content)
	}
</script>

<style scoped>
	.wrap {
		background-color: rgb(237, 237, 237);
		min-height: 100vh;
		padding-bottom: 140upx;
	}
</style>
